<template>
  <view>
    <view>Child子组件</view>
    <view>显示数据 -- {{ count }}</view>
    <button type="button" @click="clickHandle">更新数据</button>
    <view>----</view>
    
  </view>
</template>

<script>
  export default {
    data(){
      return {
        count: 1,
        isShow: true
      }
    },
    // beforeCreate, created, beforeMount, mounted, beforeUpdate, updated, beforeDestroy, destroyed;
    beforeCreate() {
      console.log('beforeCreate');
    },
    created() {
      console.log('crated');
    },
    beforeMount() {
      console.log('beforeMount');
    },
    mounted() {
      console.log('mounted');
    },
    beforeUpdate() {
      console.log('beforeUpdate');
    },
    updated() {
      console.log('updated');
    },
    beforeDestroy() {
      console.log('beforeDestroy');
    },
    destroyed() {
      console.log('destroyed');
    },
    methods: {
      // 更新数据
      clickHandle() {
        this.count = this.count += 9
      }
    }
  }
</script>

<style scoped>

</style>